<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<p>
  <?php //d($this->orderActive);?>
  <br />
</p>
<p>|-----------------------------Australian------------------------------------------|<br />
Open Orders ( <a href="http://192.168.1.124/order/import-order-to-china" target="_blank">Import New Order</a>)</p>
<table width="900" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col">No</th>
    <th scope="col">Order No</th>
    <th scope="col">Date</th>
    <th scope="col">Staff</th>
    <th scope="col">Status</th>
    <th scope="col">Action</th>
  </tr>
  <?php foreach($this->orderActive as $k => $v){?>
  <tr>
    <td><?php echo $k+1;?></td>
    <td><a href="/order/list-china-order-detail/order_no/<?php echo $v['order_no'];?>" target="_blank"><?php echo $v['order_no'];?></a></td>
    <td><?php echo $v['order_create_date'];?></td>
    <td><?php echo $v['staff_name'];?></td>
    <td><?php echo $v['order_status'];?></td>
    <td>Cancel Order</td>
  </tr>
  <?php }?>
</table>
<p><br />
  |-----------------------------China ------------------------------------------|<br />
  Locked Orders ( Prepare Stock ) [<a href="http://192.168.1.124/order/start-scan" target="_blank">Scan Products</a>]<br />
</p>
<form id="form3" name="form3" method="post" action="/order/ship-orders">

<table width="900" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col">No</th>
    <th scope="col">Order No</th>
    <th scope="col">Date</th>
    <th scope="col">Staff</th>
    <th scope="col">Status</th>
    <th scope="col">Action</th>
  </tr>
  <?php foreach($this->orderFollowUp as $k => $v){?>
  <tr>
    <td><?php echo $k+1;?></td>
    <td><a href="/order/list-china-order-prepare/order_no/<?php echo $v['order_no'];?>" target="_blank"><?php echo $v['order_no'];?>
      <input type="hidden" name="order_no[]" id="order_no<?php echo $k;?>" value="<?php echo $v['order_no'];?>" />
    </a></td>
    <td><?php echo $v['order_create_date'];?></td>
    <td><?php echo $v['staff_name'];?></td>
    <td><?php echo $v['order_status'];?></td>
    <td>Order Ready [<?php echo round($v['prescent']*100,2);?>%]</td>
  </tr>
  <?php }?>
</table>
<br />

  <label for="tracking_no">Order(s)</label>
Ready For Shipping Using Tracking 
<input type="text" name="tracking_no" id="tracking_no" />
  By Courier
  <label for="courier_name"></label>
  <input type="text" name="courier_name" id="courier_name" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
<p><br />
  Shipment (China /Australia )</p>
<table width="900" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col">No</th>
    <th scope="col">Shipment No</th>
    <th scope="col">Date</th>
    <th scope="col">Courier</th>
    <th scope="col">Order No</th>
    <th scope="col">Action</th>
  </tr>
  <?php foreach($this->shipOTS as $k => $v){?>
  <tr>
    <td><?php echo $k+1;?></td>
    <td><?php echo $v[0]['shipment_no'];?></td>
    <td><?php echo $v[0]['date_ship'];?></td>
    <td><?php echo $v[0]['name_courier'];?> | <?php echo $v[0]['tracking_no'];?></td>
    <td><?php foreach($v[1] as $orderNo){
		echo $orderNo[0]."[".round($orderNo[1]*100,2)."%]<br />";
		}?></td>
    <td><a href="/order/order-arrived/shipment_no/<?php echo $v[0]['shipment_no'];?>">Australia Received</a> | <a href="/order/print-shipment-detail/shipment_no/<?php echo $v[0]['shipment_no'];?>" target="_blank" >Print Boxs Details</a></td>
  </tr>
  <?php }?>
</table>
<p><br />
<?php //d($this->shipOTS)?>  |-----------------------------Australian------------------------------------------|<br />
  <br />
  Arrived Orders(Australia)<br />
</p>
<table width="900" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col">No</th>
    <th scope="col">Shipment No</th>
    <th scope="col">Date</th>
    <th scope="col">Staff</th>
    <th scope="col">Status</th>
    <th scope="col">Action</th>
  </tr>
  <?php foreach($this->arrivedAu as $k => $v){?>
  <tr>
    <td><?php echo $k+1;?></td>
    <td><?php echo $v[0]['shipment_no'];?></td>
    <td><?php echo $v[0]['date_ship'];?></td>
    <td><?php echo $v[0]['name_courier'];?> | <?php echo $v[0]['tracking_no'];?></td>
    <td><?php foreach($v[1] as $orderNo){
		echo $orderNo['no_order']."<br />";
		}?></td>
    <td><a href="/order/export-gn/shipment_no/<?php echo $v[0]['shipment_no'];?>" target="_blank" >Export GN </a> | </td>
  </tr>
  <?php }?></table>
<p><br />
  <br />
  <br />
  Canceled Orders(Recent 4 Weeks?)<br />
  <br />
  <br />
  QUEUE<br />
  <?php //d($this->qList);?><br />
</p>
<table width="1100" border="1" cellspacing="0" cellpadding="10">
  <tr>
    <th scope="col">No.</th>
    <th scope="col">CODE</th>
    <th scope="col">Description</th>
    <th scope="col">Create</th>
    <th scope="col">Last Update</th>
    <th scope="col">Gap Qty </th>
    <th scope="col">Update Comment</th>
    <th scope="col">Update ETA</th>
  </tr>
<?php foreach($this->qList as $k => $v) {?>  
  <tr>
    <td><?php echo $k + 1;?></td>
    <td><?php echo $v['code_product']?></td>
    <td><?php echo $v['des_product']?></td>
    <td><?php echo $v['date_create']?></td>
    <td><?php echo $v['date_update']?></td>
    <td><?php echo $v['qty_order']?></td>
    <td>
      <form id="form1" name="form1" method="post" action="">
	  <?php echo $v['comment']?>
      <input name="btn_ud" type="button" id="btn_ud" value="Update" />
    </form></td>
    <td><form id="form2" name="form2" method="post" action="">
      <?php echo $v['eta']?>
      <input name="eta" type="text" id="eta" value="yyyy-mm-dd" style="width:85px;" /><input name="btn_save" type="button" value="Save" id="btn_save" />
    </form></td>
  </tr>
<?php } ?>
</table>
<p>&nbsp; </p>
</body>
</html>
